package com.ms.game.lobby.command;

import com.ms.game.lobby.message.LobbyDebugCmdToModuleRequest;
import com.ms.service.module.zone.command.BasicDebugCommand;
import com.xpec.c4.message.MessageTypes;
import com.xpec.c4.service.group.transportlayer.GroupMessage;
import com.xpec.c4.service.message.MessageAction;

public class DoorManNotifyCommand extends BasicDebugCommand
{

	@Override
	public String execute()
	{
		LobbyDebugCmdToModuleRequest request = new LobbyDebugCmdToModuleRequest();
		request.setParam(this.command);
		request.setSessionid(this.getPlayer().getSessionID());
		request.setGuid(this.getPlayer().getGuid());
		
		GroupMessage msg = new GroupMessage();
		msg.setMessageType(MessageTypes.DEBUG_CMDTOMODULE);
		msg.setMessageContent(request);
		msg.setSessionID(null);
		msg.setDestModuleID(this.getParam(1));	
		MessageAction.sendGroupMessage(msg);
		return "Command Success to " + this.getParam(1);
	}

	@Override
	public String getName() 
	{
		return "doorman";
	}

	@Override
	public String getDescription() {
		return "doorman {moduleid} {command} exp:doorman mgdhdoorman reload";
	} 

	@Override
	public String getShortDescription() {
		// TODO Auto-generated method stub
		return "nodify debug command to target doorman do something...";
	}

}
